"""
URL configuration for a10_ht project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
from app import views
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', views.ptgb_list, name='ptgb_list'),
    path('detail/<int:pk>/', views.ptgb_detail, name='ptgb_detail'),
    path('upload/<int:ptgb_id>/', views.upload_images, name='upload_images'),
    path('delete_image/<int:ptgb_id>/', views.delete_image, name='delete_image'),
    path('reorder_images/<int:ptgb_id>/', views.reorder_images, name='reorder_images'),
]
# + static("/", document_root="./templates"))
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# python django 制作一个gbzx的列表页，每页显示15条数据，下拉列表框选择西药ybm第1位是x、中成药ybm第1位是z、
# 中草药ybm第1位是、自制剂ybm第1位是j，输入框，按a2模糊查询，新增、编辑和删除按钮，新增和编辑调用
# 同一个html页，html页面好看一些，需要放gbzx的所有字段，删除时增加一个提示页面。查询按钮紧跟新增按钮，
# 列表页包含ybm，a2,a8,a9,a29,bwm,a61，gbzx的数据量在30万左右